//---------------------------------------------------------------------------

#ifndef LineDrawingH
#define LineDrawingH

#include "Segment.h"
#include "Lista.h"

class LineDrawing {
private:
        Lista<Segment>* segmentList;
        bool selected;
public:
        LineDrawing();
        LineDrawing(GLPoint);
        ~LineDrawing();

        void addPoint(GLPoint p);
        void iniciar();
        void avanzar();
        void retroceder();
        void eliminarActual();
        void insertaDespues( Segment* segment );
        void insertaAntes( Segment* segment );
        void select(float x, float y);
        bool getSeleccionado();
        void deleteSegment();
        void savePosition();
        void restorePosition();

        GLPoint getPoint1(int i);
        GLPoint getPoint2(int i); 
        GLPoint getPoint1();
        GLPoint getPoint2();
        GLPoint setPoint1(GLPoint p);
        GLPoint setPoint2(GLPoint p);
        int getNumberOfPoints();
        bool containsPoint(GLPoint p, float distance);

};
//---------------------------------------------------------------------------
#endif
